package com.jxd.dianping.service;

import com.jxd.dianping.common.BusinessException;
import com.jxd.dianping.model.CategoryModel;

import java.util.List;

public interface CategoryService {

    /**
     * 新建品类
     * @param categoryModel
     * @return
     */
    CategoryModel create(CategoryModel categoryModel) throws BusinessException;

    /**
     * 根据id查询品类
     * @param id
     * @return
     */
    CategoryModel get(Integer id) throws BusinessException;

    /**
     * 查询所有品类
     * @return
     */
    List<CategoryModel> selectAll();

    Integer countAllCategory();
}
